package com.techtransteam.techtransteamWeb.dal.entities;
// default package
// Generated 04.01.2014 16:35:54 by Hibernate Tools 4.0.0

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Orders generated by hbm2java
 */
@Entity
@Table(name = "orders")
public class Order implements java.io.Serializable {

	private long id;
	private User usersByCustomerId;
	private User usersByManagerId;
	private User usersByTranslatorId;
	private String name;
	private String description;
	private Date startDate;
	private Date dueDate;
	private BigDecimal price;

	public Order() {
	}

	public Order(long id, User usersByCustomerId, User usersByManagerId,
			User usersByTranslatorId) {
		this.id = id;
		this.usersByCustomerId = usersByCustomerId;
		this.usersByManagerId = usersByManagerId;
		this.usersByTranslatorId = usersByTranslatorId;
	}

	public Order(long id, User usersByCustomerId, User usersByManagerId,
			User usersByTranslatorId, String name, String description,
			Date startDate, Date dueDate, BigDecimal price) {
		this.id = id;
		this.usersByCustomerId = usersByCustomerId;
		this.usersByManagerId = usersByManagerId;
		this.usersByTranslatorId = usersByTranslatorId;
		this.name = name;
		this.description = description;
		this.startDate = startDate;
		this.dueDate = dueDate;
		this.price = price;
	}

	@Id
	@Column(name = "id", unique = true, nullable = false)
	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customer_id", nullable = false)
	public User getUsersByCustomerId() {
		return this.usersByCustomerId;
	}

	public void setUsersByCustomerId(User usersByCustomerId) {
		this.usersByCustomerId = usersByCustomerId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "manager_id", nullable = false)
	public User getUsersByManagerId() {
		return this.usersByManagerId;
	}

	public void setUsersByManagerId(User usersByManagerId) {
		this.usersByManagerId = usersByManagerId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "translator_id", nullable = false)
	public User getUsersByTranslatorId() {
		return this.usersByTranslatorId;
	}

	public void setUsersByTranslatorId(User usersByTranslatorId) {
		this.usersByTranslatorId = usersByTranslatorId;
	}

	@Column(name = "name", length = 1024)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "description", length = 2048)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "start_date", length = 29)
	public Date getStartDate() {
		return this.startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "due_date", length = 29)
	public Date getDueDate() {
		return this.dueDate;
	}

	public void setDueDate(Date dueDate) {
		this.dueDate = dueDate;
	}

	@Column(name = "price", precision = 131089, scale = 0)
	public BigDecimal getPrice() {
		return this.price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

}
